import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
// import LayoutView from "../../../music/src/views/LayoutView";
import LayoutView from "../views/LayoutView";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'LayoutView',
    component: LayoutView,
    children:[
      {
        path: '/',
        name: 'home',
        component: HomeView,
      },
      {
        path: '/details/:summary',
        name: 'Details',
        component: ()=>import('../components/hot/DetailsView')
      },
      {
        path: '/area',
        name:'Area',
        component: ()=>import('../components/policy/RiskArea')
      }
    ]
  },
  {
    path: '/test',
    name:'Test',
    component: ()=>import('../components/policy/AcidTest')
  },
  {
    path: '/prevention',
    name:'Prevention',
    component: ()=>import('../components/policy/EpidemicPrevention')
  },
  {
    path: '/city/:name/:id',
    name:'City',
    component: ()=>import('../components/map/CityMap'),
    props:true
  },
  {
    path: '/travel',
    name:'Travel',
    component: ()=>import('../components/policy/TravelPolicy')
  },
  {
    path: '/select',
    name:'Select',
    component: ()=>import('../components/select/CitySelect')
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
